<div class="dataCount mt20 mb20" style="margin-left: 30px;margin-right: 30px;">
    <form  id="searchForm" action="{{url("report/index")}}"  method="post">
        <div class="nav" style="height:85px;">
            <div>
                <input type="text" name="userId"  value="<?php echo $this->request->get('userId'); ?>" placeholder="输入用户ID" class="seek">
                <input type="text" name="nickname" value="<?php echo $this->request->get('nickname'); ?>" placeholder="用户昵称"  class="seek">
                <span class="select-my">
                    <select name="type" data="<?php echo $this->request->get('type') ? $this->request->get('type') : 0; ?>">
                        <option value="0">
                            请选择状态
                        </option>
                        <option value="1">
                            支付
                        </option>
                        <option value="2">
                            提现
                        </option>
                    </select>
                </span>
                <button id="search_btn" style="width:80px" type="button">搜索</button>
                <input type="text" name="createTime" id="createTime" value="<?php echo $this->request->get('createTime') != "" ? $this->request->get('createTime') : ""; ?>" placeholder="请输入开始时间"  class="seek">
                <input type="text" name="endTime" id="endTime" value="<?php echo $this->request->get('endTime') != "" ? $this->request->get('endTime') : ""; ?>" placeholder="请输入结束时间"  class="seek">
            </div>
        </div>
    </form>
    <table class="list-tb">
        <tr>
            <th width="3%"><input type="checkbox"  class="ckb_manage"  />全选</th>
            <th width="5%">用户ID</th>
            <th width="5%">用户昵称</th>
            <th width="5%">日志类型</th>
            <th width="5%">金额</th>
            <th width="5%">现金数</th>
            <th width="7%">创建时间</th>
            <th width="10%">操作</th>
        </tr>
        {% if list %}
        {% for record in list %}
        <tr>
            <td > <input type="checkbox" name="ids[]"class="ckb" recordId="{{record['id']}}"  value="{{record['id']}}" /></td>
            <td  >{{record['userId']}}</td>
            <td  >
                <p  style="overflow:hidden;text-overflow:ellipsis; -o-text-overflow:ellipsis;white-space:nowrap;width:100%;">  {{record['userName']}} </p>
            </td>
            <td  >
                {% if record['type'] == 1  %}
                <span style="color:#007aff">支付</span>
                {% elseif record['type'] == 2 %}
                <span style="color:red">提现</span>
                {% endif %}
            </td>
            <td  >
                <p  style="overflow:hidden;text-overflow:ellipsis; -o-text-overflow:ellipsis;white-space:nowrap;width:100%;">  {{record['money']}} </p>
            </td>
            <td  >
                {% if record['type'] == 1  %}
                {{record['money']}}￥
                {% elseif record['type'] == 2 %}
                {{record['cash']}}￥
                {% endif %}
            </td>
            <td  >{{date('Y-m-d H:i:s',record['createTime'])}}</td>
            <td  >
            </td>
        </tr>
        {% endfor %}
        {% else  %}
        <tr>
            <td colspan="10">
                <div class="noData">
                    <p class="info">没有符合条件的结果</p>
                </div>
            </td>
        </tr>
        {% endif %}

    </table>
    <div class="page mt30">
        {{ show }}
    </div>
</div>
<script type="text/javascript" src="{{constant('ADMIN_JS_PATH')}}/laydate/laydate.js"></script>
<script>
/*
 * 提交搜索表单
 * 
 */
var submitSearchForm = function () {
    $("#searchForm").submit();
};

laydate.render({
    elem: '#createTime'
});


laydate.render({
    elem: '#endTime'
});


$(window).load(function () {
    $('#search_btn').bind('click', submitSearchForm);
});

</script>